{include file='common/head'}
<>
<div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">首页</a>
        <a href="">演示</a>
        <a href="">
          <cite>实名认证</cite></a>
      </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body">
    <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so">
            <div class="layui-input-inline">
                <select name="cateid">
                    <option>搜索关键词</option>
                    <option>c</option>
                    <option>accc</option>
                    <option>c</option>
                </select>
            </div>
            <input type="text" name="name"  placeholder="请输入关键词" autocomplete="off" class="layui-input">
            <span>注册时间</span><input class="layui-input" placeholder="开始日" name="start" id="start">至
            <input class="layui-input" placeholder="截止日" name="end" id="end">
            <input type="submit" name="sub" class="layui-btn" value="开始搜索" lay-submit="" lay-filter="sreach">
            <button class="layui-btn" onclick="x_admin_show('导出数据','{:url(\'index/Models/zixunadd\')}')">导出数据</button>
        </form>

    </div>
    <form class="layui-form" action="">
    <table class="layui-table">
        <thead>
        <tr>
            <th>NO</th>
            <th>评论ID</th>
            <th>评论内容</th>
            <th>信息ID</th>
            <th>评论时间</th>
            <th>操作</th>
        </thead>
        <tbody>
        {volist name="rs" id="rs"}
        <tr>
            <td>{$key+1}</td>
            <td>1ncissssss</td>
            <td>1</td>
            <td>12345678901</td>
            <td>1</td>
            <td class="td-manage">
                <input type="checkbox" <?php if (0 ==0): ?>  checked="" <?php endif; ?> name="status[]" lay-skin="switch" lay-filter="switchSuodoing" lay-text="开启|关闭"/ value="">
            </td>
        </tr>
        {/volist}
        </tbody>
    </table>
    <div class="page">
        <div>

        </div>
    </div>
    </form>
</div>

<script>
    layui.use(['laydate','form'], function(){
        var laydate = layui.laydate;
        var form = layui.form;
        form.on('switch(switchTest)', function(data){
            var id = data.value;
            //var faxian=data.value.slice(2,3);
            //alert(faxian);
            $.ajax({
                url: "{:url('index/xinxi/faxianflg')}",
                type: "post",
                dataType: "JSON",
                data: {mid: id},
                success: function (res) {
                    if (res ==1) {
                        layer.msg('操作成功！');
                        //alert(11);
                        //location.reload();
                        return false;
                    } else {
                        layer.msg('操作失败！');
                        /*setTimeout(function () {
                            location.reload();
                        }, 1000);*/
                        return false;
                    }
                }
            });
        });


    });
    /*用户-停用*/
    function member_stop(obj,id){
        layer.confirm('确认要停用吗？',function(index){

            $.ajax({
                url:'del',
                type:'POST',
                data:{'m_id':did},
                success:function(data){
                    //alert(data);
                    setTimeout(function(){  //使用  setTimeout（）方法设定定时2000毫秒
                        window.location.reload();//页面刷新
                    },500);                 },
                error:function(data){
                    //console.log(data);
                    alert('删除失败');
                }

            })
            layer.msg('已删除!',{icon:1,time:1000});
        });
    }

    function member_del(obj,did){
        layer.confirm('确认要删除吗？',function(index){
            //window.location.href="";
            //发异步删除数据
            $.ajax({
                url:'del',
                type:'POST',
                data:{'m_id':did},
                success:function(data){
                    //alert(data);
                    setTimeout(function(){  //使用  setTimeout（）方法设定定时2000毫秒
                        window.location.reload();//页面刷新
                    },500);                 },
                error:function(data){
                    //console.log(data);
                    alert('删除失败');
                }

            })

            //$(obj).parents("tr").remove();
            layer.msg('已删除!',{icon:1,time:1000});
        });
    }

    function delAll (argument) {

        var data = tableCheck.getData();

        layer.confirm('确认要删除吗？'+data,function(index){
            //捉到所有被选中的，发异步进行删除
            layer.msg('删除成功', {icon: 1});
            $(".layui-form-checked").not('.header').parents('tr').remove();
        });
    }
</script>

</body>

</html>